<?php

namespace Modules\Mall\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class WebsetRequest extends FormRequest
{
    //验证规则
    public function rules()
    {
        return array (
        	'logo'=>'required',
			'name'=>'required',
			'banquan'=>'required',
			'phone'=>'required',
			'about'=>'required'
);
    }

    //错误信息处理
    public function messages()
    {
        return array (
        	'logo.required'=>'请上传网站logo',
			'name.required'=>'请填写网站名称',
			'banquan.required'=>'请填写版权信息',
			'phone.required'=>'请填写联系方式',
			'about.required'=>'请填写关于'
);
    }

    //权限验证
    public function authorize()
    {
        return true;
    }
}
